<? include("acceso.php");?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Admin</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="">
		<meta name="author" content="">
		<link href="css/bootstrap.css" rel="stylesheet">
		<link href="css/bootstrap-responsive.css" rel="stylesheet">
		<link href="css/adm.css" rel="stylesheet">
		<!--[if lt IE 9]><script type="text/javascript" src="js/html5.js"></script><![endif]-->
		<!--<script src="js/bootstrap.js"></script>-->
		
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js" ></script>
<!--<script type="text/javascript" src="valid2.js"></script>-->
<script type="text/javascript">










</script>
   
    
</head>
<div class="container"  >

 
<body  >
<?php 
if($loginCorrecto) 
{ //?>
<div id="navbar" class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<a class="brand" href="inicio.php"><img src="../img/logo_02.png" alt="Jóvenes Hoy"></a>
		<ul class="nav">
			<li><a href="inicio.php">inicio</a></li>
			<li ><a href="list_titulos.php">tus dudas y preguntas</a></li>
            <li ><a href="list_mus.php">música</a></li>
             <li><a href="list_vid.php">vídeo</a></li>
            <li  ><a href="list_not.php">noticias</a></li>
            <li ><a href="list_web.php">webquest</a></li>
			<li ><a href="list_recurs2.php">recursos</a></li>
            <li class="active"><a href="list_libro.php">otros libros</a></li>
			<li><a href="listImg.php" >imágenes Home</a></li>
		</ul>
	</div>
</div>
<div class="container-fluid">
	<div align="right" style="margin-top:100px" ><? echo $idnombre;?>&nbsp;&nbsp;&nbsp;&nbsp;<a href="logout.php">Salir</a></div>

<h1>Otros libros</h1><br>
<?
//include'clsJovAdm.php';
//$objContenido = new contenido;
$sqltemas = $objContenido -> temas();
?>



<a href="list_libro.php" class="btn_submit">Regresar</a><div class="spacer-10">&#32;</div>
  <?
$grabar= $_POST["grabar"];
			if(empty($grabar)){ ?>

<div>
<form action="ingLib.php" method="post" class="form-actions" name="form1"  onSubmit="return enviar_formulario();">
<table  border="0" >

 

  <tr>
    <td width="67" height="49">Titulo</td>
    <td width="468"><input type="text" name="txtTit" id="textfield"  class="Titul"   /></td>
    <td width="24">&nbsp;</td>
  </tr>
   <tr>
    <td width="67" height="49">Url</td>
    <td width="468"><input type="text" name="txtUrl" id="textfield"  class="Titul"   /> </td>
    <td width="24">&nbsp;</td>
  </tr>
  
 
 
  <tr>
    <td>&nbsp;</td>
    <td> <input name="grabar" type="submit"   class="btn btn-primary " value="Grabar" /></td>
    <td>&nbsp;</td>
  </tr>
</table>
</form>
</div>

 <?php
 
  
}


			else
			
			
{
$Titu="<p>".$_POST['txtTit']."</p>";
$Titu = str_replace("ó","&#243;",$Titu);
$Titu = str_replace("á","&#225;",$Titu);
$Titu = str_replace("é","&#233;",$Titu);
$Titu = str_replace("í","&#237;",$Titu);
$Titu = str_replace("ú","&#250;",$Titu);
$Titu = str_replace("ñ","&#241;",$Titu);
$Titu = str_replace("¿","&iquest;",$Titu);
$Titu = str_replace('"',"&#34;",$Titu);
$Titu = str_replace('?',"&#63;",$Titu);
$Titu = str_replace('(',"&#40;",$Titu);
$Titu = str_replace(')',"&#41;",$Titu);

$Url=$_POST['txtUrl'];
$post="";
$order="0";
$cls="";
$fec= date ("Y-m-d"); 
$tit2="";
$validar="no";

$objContenido -> ingLib($fec,$post,utf8_decode($Titu),$Url,$cls,$validar,$imagen);


echo "<div id='form'> Datos fueron registrados<br><br> Para publicarlo realizarlo desde el listado. <a href='list_libro.php'><u>Ir listado</u></a></div>";

}
?>


















</div>


 <script src="js/bootstrap.js"></script>
 <?
} 
else

{?>
<div align="center">
<h3>Usuario no permitido</h3>
<p>
	<a href="login.php">Inicio</a>
</p>
</div>
<?
}
?>

</body>
</html>